@isTest
public class TestRestrictContactByName {

    @isTest
    static void testTrigger1() {
        Contact c = new Contact(LastName='Jim');
        Database.SaveResult result = Database.insert(c);
        System.assertEquals(true, result.isSuccess());
        
        Contact c2 = new Contact(LastName='invalidname');
        Database.SaveResult result2 = null;
        try {
        	Database.insert(c2);
        } catch(DmlException e) {
            System.debug(e);
        }
        // System.assertEquals(false, result2.isSuccess());
        //System.assert(result2.getErrors().size() > 0);
        //System.assertEquals('The Last Name "'+c.LastName+'" is not allowed for DML', result2.getErrors()[0].getMessage());
        
    }
    
}